<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <title>登录</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link href="./css/signin.css" rel="stylesheet">
    <script src="https://code.jquery.com/jquery-latest.js"></script>
    <script>
        $(document).ready(function () {
            $("#inputEmail").blur(function(){
                var va=$("#inputEmail").val();
                $.ajax({
                    type:"get",
                    url:"user/login",
                    data:{uname:va},
                    datatype:"json",
                    async:true,
                    success:function (data) {
                        if (data){
                            $("#span").html(data);
                        }
                    }
                });
            });
        });
    </script>
</head>
<body>
    <div class="container">
        <form class="form-signin" method="post" action="user/login">
            <h2 class="form-signin-heading">Please sign in</h2>
            <label for="inputEmail" class="sr-only" >Email address</label>
            <input type="text" id="inputEmail" name="username" class="form-control" placeholder="Email address" required autofocus>
            <span id="span"></span>
            <label for="inputPassword" class="sr-only">Password</label>
            <input type="password" id="inputPassword" name="password" class="form-control" placeholder="Password" required>
            <div class="checkbox">
                <label>
                    <input type="checkbox" value="remember-me"> Remember me
                </label>
            </div>
            <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
        </form>
    </div>
</body>
</html>
